/*
 * Licensed to the Apache Software Foundation (ASF) under one or more
 * contributor license agreements.  See the NOTICE file distributed with
 * this work for additional information regarding copyright ownership.
 * The ASF licenses this file to You under the Apache License, Version 2.0
 * (the "License"); you may not use this file except in compliance with
 * the License.  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package spec;


import java.io.Serializable;
import java.util.List;

public class BaseSpec implements Serializable {


    private String key;
    private String prototype;
    private String label;
    private String description;
    private String value;
    private String valueSetter;
    private List<String> allowActions;
    private List<String> allowCustomTemplates;
    private List<BaseSpec> children;


    public static BaseSpec createSpec(String key, String prototype,
                                      String label, String description,
                                      String value, String valueSetter,
                                      List<String> allowActions, List<String> allowCustomTemplates,
                                      List<BaseSpec> children) {
        return new BaseSpec(key, prototype,
                label, description,
                value, valueSetter,
                allowActions,
                allowCustomTemplates,
                children);
    }

    public BaseSpec() {
    }

    public BaseSpec(String key, String prototype, String label, String description, String value, String valueSetter, List<String> allowActions, List<String> allowCustomTemplates, List<BaseSpec> children) {
        this.key = key;
        this.prototype = prototype;
        this.label = label;
        this.description = description;
        this.value = value;
        this.valueSetter = valueSetter;
        this.allowActions = allowActions;
        this.allowCustomTemplates = allowCustomTemplates;
        this.children = children;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getPrototype() {
        return prototype;
    }

    public void setPrototype(String prototype) {
        this.prototype = prototype;
    }

    public String getLabel() {
        return label;
    }

    public void setLabel(String label) {
        this.label = label;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public String getValueSetter() {
        return valueSetter;
    }

    public void setValueSetter(String valueSetter) {
        this.valueSetter = valueSetter;
    }

    public List<String> getAllowActions() {
        return allowActions;
    }

    public void setAllowActions(List<String> allowActions) {
        this.allowActions = allowActions;
    }

    public List<String> getAllowCustomTemplates() {
        return allowCustomTemplates;
    }

    public void setAllowCustomTemplates(List<String> allowCustomTemplates) {
        this.allowCustomTemplates = allowCustomTemplates;
    }

    public List<BaseSpec> getChildren() {
        return children;
    }

    public void setChildren(List<BaseSpec> children) {
        this.children = children;
    }
}
